package com.winhxd.b2c.common.domain.order.enums;

/**
 * @author:zhangyanwei
 * @date:2019/1/11 10:43:15
 * @Description:页面售后状态
 **/
public enum AfterSaleViewStatusEnum {
	/**
	 * 待审核
	 */
	WAIT_CHECKED( 1, "待审核"),
	/**
	 * 已审核
	 */
	CHECKED(2, "已审核"),
	/**
	 * 拒绝
	 */
	REFUSE(3, "拒绝"),
	/**
	 * 退货中
	 */
	RETURNING(4, "退货中"),
	/**
	 * 已退款
	 */
	REFUNDED(5, "已退款"),
	/**
	 * 换货中
	 */
	EXCHANGING(6, "换货中"),
	/**
	 * 已换货
	 */
	EXCHANGED( 7, "已换货"),
	/**
	 * 已换货
	 */
	CANCLED( 8, "已取消"),
	/**
	 * 已换货
	 */
	CLOSED( 9, "已关闭"),
	/**
	 * 换货中
	 */
	REFUNDING(10, "退款中"),
	/**
	 * 手动关闭售后
 	 */
	HANDLE_CLOSED( 11, "手动关闭售后");

	private Integer typeCode;
	private String typeDesc;

	public Integer getTypeCode() {
		return typeCode;
	}

	public String getTypeDesc() {
		return typeDesc;
	}

	AfterSaleViewStatusEnum(Integer typeCode, String typeDesc) {
		this.typeCode = typeCode;
		this.typeDesc = typeDesc;
	}

	public static AfterSaleViewStatusEnum getAfterSaleViewStatusEnumByCode(Integer typeCode) {
		for (AfterSaleViewStatusEnum afterSaleViewStatusEnum : AfterSaleViewStatusEnum.values()) {
			if (afterSaleViewStatusEnum.getTypeCode().intValue() == typeCode.intValue()) {
				return afterSaleViewStatusEnum;
			}
		}
		return null;
	}
}
